package com.tony.cloud.data.provider.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value="/person/**")
public class PersonController {
	
	@Autowired
	private Environment env ;

	@RequestMapping(value="hello")
	public @ResponseBody Map<String,Object> getPersons(){
		Map<String,Object> p1 = new HashMap<>() ;
		p1.put("name","赵伟锋");
		p1.put("url",env.getProperty("mysqldb.datasource.url"));
		return p1 ;
	}
	
}
